package com.testjpa.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;
import java.util.Map;

/**
 * 作者: LCG
 * 日期: 2020/5/19 10:55
 * 描述:
 */

@RestController
public class RibbonController {

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping("test01")
    public String test01(){

        Map<String,Object> map=new HashMap<>();
        map.put("ok","=通过^_^-");

        String result = restTemplate.postForObject("http://consule-client2/test02", map, String.class);

        return result;
    }

}
